<?php

/**
 * UsuarioGoogle form base class.
 *
 * @method UsuarioGoogle getObject() Returns the current form's model object
 *
 * @package    practil
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseUsuarioGoogleForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'identifier'     => new sfWidgetFormTextarea(),
      'name'           => new sfWidgetFormInputText(),
      'given_name'     => new sfWidgetFormInputText(),
      'family_name'    => new sfWidgetFormInputText(),
      'link'           => new sfWidgetFormTextarea(),
      'picture'        => new sfWidgetFormTextarea(),
      'gender'         => new sfWidgetFormInputText(),
      'locale'         => new sfWidgetFormInputText(),
      'verified_email' => new sfWidgetFormInputText(),
      'usuario_id'     => new sfWidgetFormPropelChoice(array('model' => 'Usuario', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'identifier'     => new sfValidatorString(),
      'name'           => new sfValidatorString(array('max_length' => 255)),
      'given_name'     => new sfValidatorString(array('max_length' => 255)),
      'family_name'    => new sfValidatorString(array('max_length' => 255)),
      'link'           => new sfValidatorString(),
      'picture'        => new sfValidatorString(),
      'gender'         => new sfValidatorString(array('max_length' => 6)),
      'locale'         => new sfValidatorString(array('max_length' => 10)),
      'verified_email' => new sfValidatorString(array('max_length' => 255)),
      'usuario_id'     => new sfValidatorPropelChoice(array('model' => 'Usuario', 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('usuario_google[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'UsuarioGoogle';
  }


}
